<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/11/13
  Time: 18:32
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>教室信息</title>
    <link rel="stylesheet" href="func1.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="header">全部教室信息</div>
<div id="banner">
    <form id="search" action="http://localhost:8080/ClassroomManageSystem_war_exploded/teacherServlet?action=SelectClassroomById" method="post">
        <input type="text" id="searchmsg" name="searchmsg" placeholder="请输入教室号">
        <input type="submit" value="搜索" id="sub">
    </form>
</div>
<table border="1" id="content">
    <tr>
        <th>教室号</th>
        <th>教室类型</th>
        <th>设备</th>
        <th>容量</th>
    </tr>

    <c:forEach items="${requestScope.classrooms}" var="classroom">
        <tr>
            <td>${classroom.clnum}</td>
            <td>${classroom.type}</td>
            <td>${classroom.medium}</td>
            <td>${classroom.capacity}</td>
        </tr>
    </c:forEach>
    <c:choose>
        <c:when test="${requestScope.classroom != null}">
            <tr>
                <td>${requestScope.classroom.clnum}</td>
                <td>${requestScope.classroom.type}</td>
                <td>${requestScope.classroom.medium}</td>
                <td>${requestScope.classroom.capacity}</td>
            </tr>
        </c:when>
        <c:when test="${requestScope.msg != null}">
            <h4>${requestScope.msg}</h4>
        </c:when>
    </c:choose>

</table>
</body>
</html>
